package cn.keyvalue.ccf.common.util;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;

public class WebUtils {

	public static String getVelocityName(HttpServletRequest request) {

		String uri = request.getRequestURI();

		if (StringUtils.contains(uri, "/")) {
			uri = StringUtils.substringAfterLast(uri, "/");
		}

		return StringUtils.substringBefore(uri, ".do");

	}

}
